<template>
  <div class="depart-detail">
    <div class="layout">
      <div class="page-title">
        <span>科室详情：</span>
        <span @click="$emit('goBack')">返回</span>
      </div>
    </div>
    <div
      class="depart-main"
      v-for="item in departmentDetailsList"
      :key="item.zdmc"
    >
      <div class="depart-name">
        <h3 class="depart-sort-title">科室名称</h3>
        <div
          class="depart-sort-main"
          style="text-indent: 0rem;"
        >
          <div style="width:400px;height:300px"><img
              :src="item.url"
              alt=""
              style="width:100%;height:100%"
            ></div>
          <div class="depart-name-about">
            <p>科室地址：{{item.address}}</p>
            <p>联系电话：{{item.lxdh}}</p>
          </div>
        </div>
      </div>
      <div class="depart-jieshao">
        <h3 class="depart-sort-title">科室简介</h3>
        <div class="depart-sort-main">
          {{item.ksjs}}
        </div>
      </div>
      <div class="depart-chengguo">
        <h3 class="depart-sort-title">临床药物试验结果</h3>
        <div class="depart-sort-main">
          {{item.lcsycg}}
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { getBaseAPI } from '@/api/index.js';
export default {
    props: {
        zdbm: {
            type: String,
            default: null
        }
    },
    data() {
        return {
            departmentDetailsList: []
        };
    },
    mounted() {
        this.getDepartmentDetailData();
    },
    methods: {
        // 科室详情数据
        async getDepartmentDetailData() {
            const res = await getBaseAPI({
                cxlx: 'Query_KS',
                zdbm: this.zdbm
            });
            if (res.code == 'succ') {
                this.departmentDetailsList = res.result;
            }
        },
        goBack() {}
    }
};
</script>
<style scoped>
.depart-detail {
    width: 100%;
    min-height: 100vh;
    font-size: 1.1rem;
}
.depart-main {
    width: 90%;
    margin: 0 auto;
}
.depart-sort-main {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    line-height: 30px;
    text-indent: 2rem;
}
.depart-name-about {
    margin: 70px;
    line-height: 45px;
}
.depart-sort-title {
    margin: 15px 0px;
}
</style>